package com.example.pacs.exception;

import com.example.pacs.enums.PacsExceptionEnum;
import lombok.Getter;

@Getter
public class PacsException extends RuntimeException{

    private final Integer errorCode;

    PacsException (Integer errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
    }

    public PacsException (PacsExceptionEnum exceptionEnum) {
        super(exceptionEnum.getErrorMsg());
        this.errorCode = exceptionEnum.getErrorCode();
    }
}
